package com.loop;

/*
要写注释哦!!!
*/
public class Demo3 {
    public static void main(String[] args) {
        int count = 0;
        for (int i = 1000; i <= 9999; i++) {
            int ge = i % 10;
            int shi = (i / 10) % 10;
            int bai = (i / 100) % 10;
            int qian = (i / 1000) % 10;
            if (ge == qian && shi == bai) {
                System.out.print(i + "是对称数字！");
                count++;
                if (count % 5 == 0) {
                    System.out.println();
                }
            }
        }
        System.out.println();
        System.out.println("1000-9999一个有" + count + "个对称数字！");
    }
}
